package com.candy.sys.service.impl;

import com.candy.sys.entity.Role;
import com.candy.sys.entity.UserRole;
import com.candy.sys.mapper.UserRoleMapper;
import com.candy.sys.service.IUserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户角色关联 服务实现类
 * </p>
 *
 * @author pxs
 * @since 2021-06-26
 */
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements IUserRoleService {

	@Override
	public List<Role> getRolesByUserId(Long userId)
	{
		return baseMapper.selectRolesByUserId(userId);
	}
}
